<template>
	<view class="mall-body">
		<view class="mall-goods">
			<view
				class="mall-bar"
				v-for="(item, index) in goodList"
				:key="index"
			>
				<ProductInfor
					:infor="item"
					@click.native="linkTo('/packages/MallPages/GoodDetail/index',item)"
					@coletion="colletAction()"
					class="card"
				/>
			</view>
		</view>
	</view>
</template>

<script>
import ProductInfor from './productInfor.vue'

export default {
  components: {
    'ProductInfor': ProductInfor
  },
  props: ['goodList'],
  data() {
    return {
      // 商品信息列表
      GoodList: [],
      // r
    }
  },
  methods: {
    // 点击收藏
    colletAction() {

      this.infor.isCollect = !this.infor.isCollect
    },

  }
}
</script>

<style lang="scss">
	.mall-body {
		padding-top: 20rpx;
		.mall-goods{
			width: 750rpx;
			padding: 10rpx;
			column-count: 2;
			column-gap: 20rpx;
			margin: 0 auto;
			.mall-bar {
				break-inside: avoid;
			}
		}
	}
</style>
